-
Notifications
You must be signed in to change notification settings - Fork 735
[ci] Match commit headers (like Signed-off-by:) case-insensitively
#4466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
c5b85e2 to
2567ffc
Compare
02df723 to
d6ec246
Compare
d6ec246 to
c8b235e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say the case is for us to define, no?
To me, upper case looks better to start a sentence/paragraph. That's the case with the rest of the text and what I am most used to seeing on Git/GH.
I am not opposed to case insensitive, but I would like to understand the motivation. If we allow that, we should update the corresponding contribution rules.
What was the sneaky error exactly?
That would be ok too, if that's what we decide. (Git describes these as being like RFC822 headers, so from Git's point of view, they should be case-insensitive.)
I noticed this when looking over the change again and saw that our code was checking for "Sentence-case", but the tests used "Title-Case", and so they should have been failing. I don't have an opinion about which style(s) we accept though. I just modified the code to match the now-fixed test.
The test cases mixed string concatenation and commas incorrectly, so we weren't testing what we expected. For example: "[msg] Subject\n\n"
"> This body line (verbatim text) is clearly over 72 characters long[...]",
"",
"> This body line (verbatim text) is clearly over 72 characters long[...]",
"",
"Regular text"From reading the surrounding context, that should be a single commit message to test, but it's actually five:
|
|
Got it, thank for clarifying @jimporter! I have a slight preference for Sentence case, but I don't mind changing it if you like, provided it's all in sync with CONTRIBUTING.md. |
We could also require Sentence case, but I think if that's our decision, we should make a separate rule for it so that we can report a more-specific error message. (Currently, we'd only report an error if the commit message contained a header like this that broke some other rule, like our line-length rule.) |
|
You're right, for some reason I was under the impression that the rules implied case today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, looking good 👍
This resolves #4465.